package com.freewater.springboot.demo.aop.parameter.anno;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.UUID;

public class Main {
    public static void main(String[] args) {
        final AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        applicationContext.registerShutdownHook();
        final PersonService personService = applicationContext.getBean(PersonService.class);

        final Person person = new Person();
        person.setId(UUID.randomUUID().toString().replaceAll("-", ""));
        person.setName("zhangsan");
        personService.doSomeThing(person);
    }
}
